The present invention relates generally to drawing programs and computer-aided drafting (CAD) systems and, more particularly, to precise cursor positioning and screen feedback techniques for creating and manipulating graphic objects.
Computers have become a powerful tool for the rapid and economical creation of pictures. The use of computer graphics is particularly well suited for automating designing and drafting techniques. CAD is like a word processor for drawings. Instead of pen and paper, the CAD user employs a computer keyboard and a mouse, light pen, digitizer tablet, or some other pointing device to create an electronic description of a drawing in the computer's memory. This image is displayed on a monitor and stored on a disk. When the user is satisfied with a drawing, he or she obtains a "hardcopy" by sending the stored image to an output device such as a plotter.
In CAD, one creates an illustration by combining basic geometric objects such as points, lines, and arcs. Each object has a precise mathematical definition facilitating storage in the computer. This also allows the computer to perform complex manipulations and test relations between objects. For example, when an object's dimensions are specified to the computer, the user can view any side of the object to see how it will look after construction.
In drafting, it is often necessary to maintain precise geometric relationships between various objects in a drawing. The draftsman's hand can rarely, if ever, achieve the mathematical precision that is available with CAD systems. However, to take advantage of this precision, the user must accurately communicate to the computer what is to be drawn.
Ordinarily, the user draws by entering, either by keyboard or pointing device, the location of an object's "control points." For example, if the user wants to draw a line (line segment), he or she types in or points to the starting and ending points. The computer then displays a line defined by these control points. Alternatively, the computer can infer control points from what the user enters. For example, the user may enter a starting point, length, and angle. From this input, the computer calculates the second control point before displaying the line.
Neither input method is perfect. While keyboard entry allows for the precise input of most geometric objects, it is usually not the most efficient means by which the user may communicate with a computer. For example, it would be a tedious task, at best, to draw the entire floor plan of a simple house by keyboard entry. Entering locations with a pointing device, while much faster, relies too much upon the skill of the user for accuracy. As a result, there is much interest in developing techniques by which CAD users may efficiently communicate with computers without sacrificing precision.
Sutherland describes a positioning technique based upon the use of a light pen (Sutherland, Sketchpad: A Man-Machine Graphic Communication System, Proceedings-Spring Joint Computer Conference, 1963). The Sutherland Sketchpad system allows a user to communicate rapidly with a computer through the medium of line drawing.
Recognizing that typed statements were a cumbersome way to describe the shapes of complex objects, the Sketchpad system uses a light pen for the placement of a drawing cursor. To compensate for the inaccuracy created by freehand pointing, the exact location of the light pen is ignored in favor of a "pseudo-pen" location which is exactly on an object aimed at. In other words, object, the computer assumes that the user wants to point to that object. If no object is aimed at, the pseudopen location and actual pen location are identical. Thus, the Sketchpad system compensates for a user's imprecise cursor placement by constraining or snapping control points onto an existing object.
Bier discloses the use of "gravity active" points and "alignment objects." See, Bier, Snap Dragging, SIGGRAPH '86 Proceedings, Volume 20, No. 4, Aug. 18-22, 1986, 233-240. Bier's system uses a "caret" as the source of precision. The caret is distinct from the cursor: the cursor always moves with the mouse while the caret can stray from the cursor and "snap" to a gravity object which attracts it. When a control point is added to an illustration, it is always positioned at the location of the caret.
While these systems offer certain advantages over prior input techniques, they are confined to snapping cursors onto existing objects and/or grids. These systems completely ignore other "interesting" points which arise from user-created geometries. Thus, the user must manually determine these points--a task which is better automated by the computer. Moreover, prior systems fail to provide the user with adequate feedback about even the simplest interactions between the cursor and geometries. The invention recognizes these shortcomings and provides novel methods and apparatus which fulfills these and other needs.